<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>班次信息详情</title>
<jsp:include page="${home}/assets/common_inc_new.jsp"  flush="true"></jsp:include>
<script type="text/javascript" src="${home}/system/common/scripts/utils.js"></script>
<link rel="stylesheet" type="text/css" href="./edit.css">
<link rel="stylesheet" type="text/css" href="./details.css">
	<style>
		*{
			font-weight: 400;
		}
		.btn{
			width: 120px;
			height: 40px;
			margin: 0px 40px 0 0;
			border: 1px solid #288ff4;
			color: #288ff4;
			font-size: 16px;
			background-color: #fff;
			border-radius: 5px;
		}
		dl dt{
				margin-left: 40px;
		}
		.tab-content dl dt{
			color: #000000;
			font-size: 18px;
			font-weight: 400;
			
		}
		label{
			font-size: 18px;
			color:#3296fa;
			font-weight: 400;
			margin-left: 20px;
		}
	</style>

</head>

<body class="mainbody">
	
	<!--导航栏-->
    <div class="location">
        <a onclick="doReturn();" class="back"><i></i><span>返回管理页面</span></a>
        <i class="arrow"></i>
        <span id="lbTitle">班次信息详情</span>
    </div>
  <!--<div class="edit-header">
    班次信息详情
  </div>-->

	 <%
		//	获得id
		String editId =request.getParameter("id");
	 %>
	<input type="hidden" name="id" id="id" value="<%=editId %>"/>

  <!--<div class="details-wrap">-->
    <!--<div class="edit-wrap" style="border-bottom: 1px solid #dbdbdb; width: 600px">-->
	<div class="tab-content" style="padding-bottom: 10px;">
		<dl>
            <dt>班次名称：</dt>
            <dd>
                <label id="schedule_name"></label>
            </dd>
        </dl>

		<dl>
            <dt>类别：</dt>
            <dd>
                <label id="schedule_type"></label>
            </dd>
        </dl>

		<dl>
            <dt>工时：</dt>
            <dd>
                <label id="man_hour"></label>
            </dd>
        </dl>

		<dl>
            <dt>系数：</dt>
            <dd>
                <label id="ratio"></label>
            </dd>
        </dl>

		<dl>
            <dt>备注：</dt>
            <dd>
                <label id="remark"></label>
            </dd>
        </dl>
      <!--<div class="item">
        <div class="name">
          班次名称:
        </div>
        <div class="value" id="schedule_name">
          
        </div>
      </div>
      <div class="item">
        <div class="name">
          类别:
        </div>
        <div class="value" id="schedule_type">
          
        </div>
      </div>
      <div class="item">
        <div class="name">
          工时:
        </div>
        <div class="value"  id="man_hour">
          
        </div>
      </div>
      <div class="item">
        <div class="name">
          系数:
        </div>
        <div class="value" id="ratio" >
          
        </div>
      </div>
      <div class="item">
        <div class="name">
          <div class="remark">
            备注:
          </div>
        </div>
        <div class="value" id="remark">
          
        </div>
      </div>
	  -->
    </div>
	
    <div class="details-bottom">
      <!--<div class="item">
        <div class="name">
          修改时间:
        </div>
        <div class="value">
          2018-12-9 23:18:10
        </div>
      </div>
      <div class="item" style="margin-bottom: 50px">
        <div class="name">
          修改人员:
        </div>
        <div class="value">
          张三
        </div>
      </div> -->
       <!--<button class="action" type="button" onclick="back()">返回</button>-->
	   
	   <input type="button" id="btnReturn" name="btnReturn" value="返回" class="btn" onclick="back();" />
	  <!--<input type="button" id="btnReturn" name="btnReturn" value="返回" class="btn" onclick="doReturn();" />-->
      <!--<button class="action" type="button" onclick="edit()">修改</button> -->
    </div>
  <!--</div>-->

<script type="text/javascript">
	$(document).ready(function () {
			getDetailInfo();
	})

	function doReturn(){
	   window.history.back(-1);
	   parent.diag.close();
    }

	function back() {
	  window.location.href = "index.jsp";
	}

	function cancel() {
	  back();
	}

	// 获得班次信息
    function getDetailInfo() {
       var head = {	
			"service_name": "cn.dy.workatten.service.ScheduleCfgService",
			"operation_name": "getScheduleCfgById"
		}
		
		var param = {
			"id":$("#id").val(),
		}
		var options = {
			"handleError": false,
			"showProgressBar":false,
			"timeout":60000*10
		}
		
		var myCallback=function callBack(data) {
			if(data.response_code==0){
				var oneDetail = data.content.result;
				$("#man_hour").html(oneDetail.man_hour+"小时");
				$("#ratio").html(oneDetail.ratio+"分");
				$("#remark").html(oneDetail.remark);

				var schType = "";
				if(oneDetail.schedule_type == "0"){
					schType = "工作日";
				} else if (oneDetail.schedule_type == "1") {
					schType = "连假周末";
				} else if (oneDetail.schedule_type == "2") {
					schType = "法定节假日";
				} else if (oneDetail.schedule_type == "3") {
					schType = "春节";
				} else if (oneDetail.schedule_type == "4") {
					schType = "周末";
				}
				$("#schedule_type").html(schType);
				$("#schedule_name").html(oneDetail.schedule_name);

			}else{
				alert(data.response_detail);
			}				
		}		
		$.ServiceAgent.JSONInvoke(head, param, myCallback, options);
    }

</script>

</body>
</html>
